import { AxiosAccount } from '../utils/http/request';

//商品分类管理
enum categoryApi {
  list = '/goods/category/list',
  all = '/goods/category/all',
  add = '/goods/category/add',
  edit = '/goods/category/edit',
  delete = '/goods/category/delete',
}
//商品类型
enum goodsTypeApi {
  list = '/goods/goods-type/list',
  all = '/goods/goods-type/all',
  add = '/goods/goods-type/add',
  edit = '/goods/goods-type/edit',
  delete = '/goods/goods-type/delete',
  detail = '/goods/goods-type/detail',
}
//商品标签
enum goodsTagApi {
  list = '/goods/goods-tag/list',
  all = '/goods/goods-tag/all',
  add = '/goods/goods-tag/add',
  edit = '/goods/goods-tag/edit',
  delete = '/goods/goods-tag/delete',
  detail = '/goods/goods-tag/detail',
}
//商品属性
enum goodsAttributeApi {
  list = '/goods/goods-attribute/list',
  all = '/goods/goods-attribute/all',
  add = '/goods/goods-attribute/add',
  edit = '/goods/goods-attribute/edit',
  delete = '/goods/goods-attribute/delete',
  detail = '/goods/goods-attribute/detail',
}

//快递模板
enum expressTemplateApi {
  list = '/goods/express-template/list',
  all = '/goods/express-template/all',
  add = '/goods/express-template/add',
  edit = '/goods/express-template/edit',
  delete = '/goods/express-template/delete',
  detail = '/goods/express-template/detail',
}

//品牌管理
enum brandApi {
  list = '/goods/brand/list',
  add = '/goods/brand/add',
  edit = '/goods/brand/edit',
  delete = '/goods/goods/delete',
  detail = '/goods/brand/detail',
}

//商品列表
enum listApi {
  list = '/goods/goods/list',
  add = '/goods/goods/add',
  edit = '/goods/goods/edit',
  delete = '/goods/goods/delete',
  audit = '/goods/goods/audit',
  detail = '/goods/goods/detail',
}

//规格管理
enum specsApi {
  list = '/goods/spec/list',
  add = '/goods/spec/add',
  edit = '/goods/spec/edit',
  delete = '/goods/spec/delete',
}
//规格值管理
enum specsValueApi {
  list = '/goods/spec-item/list',
  add = '/goods/spec-item/add',
  edit = '/goods/spec-item/edit',
  delete = '/goods/spec-item/delete',
}
//优惠券管理
enum couponApi {
  list = '/goods/coupon/list',
  add = '/goods/coupon/add',
  edit = '/goods/coupon/edit',
  delete = '/goods/coupon/delete',
  detail = '/goods/coupon/detail',
}
//商品回收站管理
enum recycleApi {
  list = '/goods/recycle/list',
  detail = '/goods/recycle/detail',
  restore = '/goods/recycle/restore',
  delete = '/goods/recycle/delete',
}

//商品分类列表
export const categoryList = (data?: any) =>
  AxiosAccount.request({
    url: categoryApi.list,
    method: 'post',
    data: data,
  });

//商品分类列表
export const categoryAll = () =>
  AxiosAccount.request({
    url: categoryApi.all,
    method: 'post',
  });

//添加商品分类
export const categoryAdd = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.add,
    method: 'post',
    data,
  });

//修改商品分类
export const categoryEdit = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.edit,
    method: 'post',
    data,
  });

//删除商品分类
export const categoryDelete = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.delete,
    method: 'post',
    data,
  });

//商品类型列表
export const goodsTypeList = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.list,
    method: 'post',
    data,
  });

//商品类型列表
export const goodsTypeAll = () =>
  AxiosAccount.request({
    url: goodsTypeApi.all,
    method: 'post',
  });

//添加商品类型
export const goodsTypeAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.add,
    method: 'post',
    data,
  });

//修改商品类型
export const goodsTypeEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.edit,
    method: 'post',
    data,
  });

//删除商品类型
export const goodsTypeDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.delete,
    method: 'post',
    data,
  });

//快递模板列表
export const expressTemplateList = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.list,
    method: 'post',
    data,
  });

//商品类型列表
export const expressTemplateAll = () =>
  AxiosAccount.request({
    url: expressTemplateApi.all,
    method: 'post',
  });

//添加商品类型
export const expressTemplateAdd = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.add,
    method: 'post',
    data,
  });

//修改商品类型
export const expressTemplateEdit = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.edit,
    method: 'post',
    data,
  });

//删除商品类型
export const expressTemplateDelete = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.delete,
    method: 'post',
    data,
  });

//商品标签列表
export const goodsTagList = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.list,
    method: 'post',
    data,
  });

//所有商品标签
export const goodsTagAll = () =>
  AxiosAccount.request({
    url: goodsTagApi.all,
    method: 'post',
  });

//添加商品标签
export const goodsTagAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.add,
    method: 'post',
    data,
  });

//修改商品标签
export const goodsTagEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.edit,
    method: 'post',
    data,
  });

//删除商品标签
export const goodsTagDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.delete,
    method: 'post',
    data,
  });

//商品属性列表
export const goodsAttributeList = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.list,
    method: 'post',
    data,
  });

//所有商品属性
export const goodsAttributeAll = () =>
  AxiosAccount.request({
    url: goodsAttributeApi.all,
    method: 'post',
  });

//添加商品属性
export const goodsAttributeAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.add,
    method: 'post',
    data,
  });

//修改商品属性
export const goodsAttributeEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.edit,
    method: 'post',
    data,
  });

//删除商品属性
export const goodsAttributeDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.delete,
    method: 'post',
    data,
  });

//品牌列表
export const brandList = (data?: any) =>
  AxiosAccount.request({
    url: brandApi.list,
    method: 'post',
    data,
  });

//添加品牌
export const brandAdd = (data: any) =>
  AxiosAccount.request({
    url: brandApi.add,
    method: 'post',
    data,
  });

//修改品牌
export const brandEdit = (data: any) =>
  AxiosAccount.request({
    url: brandApi.edit,
    method: 'post',
    data,
  });

//删除品牌
export const brandDelete = (data: any) =>
  AxiosAccount.request({
    url: brandApi.delete,
    method: 'post',
    data,
  });

//商品列表
export const goodsList = (data: any) =>
  AxiosAccount.request({
    url: listApi.list,
    method: 'post',
    data,
  });

//添加商品
export const goodsAdd = (data: any) =>
  AxiosAccount.request({
    url: listApi.add,
    method: 'post',
    data,
  });

//修改商品
export const goodsEdit = (data: any) =>
  AxiosAccount.request({
    url: listApi.edit,
    method: 'post',
    data,
  });

//商品详情
export const goodsDetail = (data: any) =>
  AxiosAccount.request({
    url: listApi.detail,
    method: 'post',
    data,
  });

//删除商品
export const goodsDelete = (data: any) =>
  AxiosAccount.request({
    url: listApi.delete,
    method: 'post',
    data,
  });

//审核商品
export const goodsAudit = (data: any) =>
  AxiosAccount.request({
    url: listApi.audit,
    method: 'post',
    data,
  });

//规格列表
export const specList = (data: any) =>
  AxiosAccount.request({
    url: specsApi.list,
    method: 'post',
    data,
  });
//添加规格
export const specAdd = (data: any) =>
  AxiosAccount.request({
    url: specsApi.add,
    method: 'post',
    data,
  });
//修改规格
export const specEdit = (data: any) =>
  AxiosAccount.request({
    url: specsApi.edit,
    method: 'post',
    data,
  });
//删除规格
export const specDelete = (data: any) =>
  AxiosAccount.request({
    url: specsApi.delete,
    method: 'post',
    data,
  });

//规格值列表
export const specValueList = (data: any) =>
  AxiosAccount.request({
    url: specsValueApi.list,
    method: 'post',
    data,
  });
//添加规格值
export const specValueAdd = (data: any) =>
  AxiosAccount.request({
    url: specsValueApi.add,
    method: 'post',
    data,
  });
//修改规格值
export const specValueEdit = (data: any) =>
  AxiosAccount.request({
    url: specsValueApi.edit,
    method: 'post',
    data,
  });

//删除规格值
export const specValueDelete = (data: any) =>
  AxiosAccount.request({
    url: specsValueApi.delete,
    method: 'post',
    data,
  });

//优惠券列表
export const couponList = (data: any) =>
  AxiosAccount.request({
    url: couponApi.list,
    method: 'post',
    data,
  });
//添加优惠券
export const couponAdd = (data: any) =>
  AxiosAccount.request({
    url: couponApi.add,
    method: 'post',
    data,
  });
//修改优惠券
export const couponEdit = (data: any) =>
  AxiosAccount.request({
    url: couponApi.edit,
    method: 'post',
    data,
  });
//删除优惠券
export const couponDelete = (data: any) =>
  AxiosAccount.request({
    url: couponApi.delete,
    method: 'post',
    data,
  });

//商品回收站列表
export const recycleList = (data: any) =>
  AxiosAccount.request({
    url: recycleApi.list,
    method: 'post',
    data,
  });
//商品回收站详情
export const recycleDetail = (data: any) =>
  AxiosAccount.request({
    url: recycleApi.detail,
    method: 'post',
    data,
  });
//商品回收站恢复
export const recycleRestore = (data: any) =>
  AxiosAccount.request({
    url: recycleApi.restore,
    method: 'post',
    data,
  });
//商品回收站删除
export const recycleDelete = (data: any) =>
  AxiosAccount.request({
    url: recycleApi.delete,
    method: 'post',
    data,
  });
